<!-- 机械中心banner -->
<template>
  <div class="mechanicsBanner">
    <div id="mechanicsBg">
      <div class="bannerItem">
        <div class="itemBox">
         
          <h2 class="itemName">轰隆隆-机械中心</h2>
           <h1 class="itemTitle">Machine center</h1>
          <div id="heightStyleBox">
            <h3 class="heightStyle"></h3>
            <h4 class="itmeInfo">帮您免费找活，让闲置的机械动起来<span></span></h4>
          </div>
        </div>
      </div>
      <div class="navbarBox">
        <ul class="navList">
          <li class="navItem" v-for="(item,index) of navList" :key="index" @click="toNavBar(index,item.idx)">
            <img :src="item.img" class="navListImg">
            <span class="navItemName">{{item.name}}
            </span>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script >
export default {
  // import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // 这里存放数据
    return {
      navList:[
        {
          idx:1,
          img:require('./../../../../../public/img/mechanics/8.png'),
          name:'挖掘机械'
        },
        {
          idx:5,
          img:require('./../../../../../public/img/mechanics/13.png'),
          name:'路面机械'
        },
        {
          idx:2,
          img:require('./../../../../../public/img/mechanics/6.png'),
          name:'起重机械'
        },
        {
          idx:3,
          img:require('./../../../../../public/img/mechanics/14.png'),
          name:'装载机械'
        },
        {
          idx:4,
          img:require('./../../../../../public/img/mechanics/1.png'),
          name:'打桩机械'
        },
        {
          idx:7,
          img:require('./../../../../../public/img/mechanics/4.png'),
          name:'混凝土机械'
        },
        {
          idx:103,
          img:require('./../../../../../public/img/mechanics/11.png'),
          name:'高空作业机械'
        },
        {
          idx:9,
          img:require('./../../../../../public/img/mechanics/3.png'),
          name:'自卸车'
        },
        {
          idx:10,
          img:require('./../../../../../public/img/mechanics/12.png'),
          name:'机动工业车'
        },
        {
          idx:8,
          img:require('./../../../../../public/img/mechanics/7.png'),
          name:'隧道机械'
        },
        {
          idx:104,
          img:require('./../../../../../public/img/mechanics/9.png'),
          name:'矿山机械'
        },
        {
          idx:105,
          img:require('./../../../../../public/img/mechanics/15.png'),
          name:'压实机械'
        },
        {
          idx:101,
          img:require('./../../../../../public/img/mechanics/2.png'),
          name:'动力设备'
        },
        {
          idx:102,
          img:require('./../../../../../public/img/mechanics/5.png'),
          name:'支护工装'
        },
        {
          idx:100,
          img:require('./../../../../../public/img/mechanics/10.png'),
          name:'其他'
        },
      ],
    };
  },
  // 过滤器
  filters: {},
  // 监听属性 类似于data概念
  computed: {},
  // 监控data中的数据变化
  watch: {},
  // 方法集合
  methods: {
    toNavBar(index,idx){
      this.$router.push({path:'/mechanicsInfoData',query:{idx,currentIndex:2}})
    },
  },
  // 生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  // 生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  beforeCreate() {}, // 生命周期 - 创建之前
  beforeMount() {}, // 生命周期 - 挂载之前
  beforeUpdate() {}, // 生命周期 - 更新之前
  updated() {}, // 生命周期 - 更新之后
  beforeDestroy() {}, // 生命周期 - 销毁之前
  destroyed() {}, // 生命周期 - 销毁完成
  ctivated() {}, // 如果页面有keep-alive缓存功能，这个函数会触发
};
</script>

<style lang='scss' scoped>
.mechanicsBanner {
}
#mechanicsBg {
  background: url("https://hll-prod.oss-cn-beijing.aliyuncs.com/hll_newPc/mechanics/MechanicsBg.png")
    center center no-repeat;
  background-size: cover;
  width: 100%;
  height: 100vh;
  -webkit-animation-name: mechanicsBg; /*关键帧名称*/
  // -webkit-animation-timing-function: ease-in-out; /*动画的速度曲线*/
  -webkit-animation-duration: 20s; /*动画所花费的时间*/
  position: relative;
}
@-moz-keyframes mechanicsBg {
  0% {
    transform: scale(1.3); /*开始为原始大小*/
  }
  25% {
    transform: scale(1); /*放大1.1倍*/
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
@-webkit-keyframes mechanicsBg {
  0% {
    transform: scale(1.3); /*开始为原始大小*/
  }
  25% {
    transform: scale(1); /*放大1.1倍*/
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

@-ms-keyframes mechanicsBg {
  0% {
    transform: scale(1.3); /*开始为原始大小*/
  }
  25% {
    transform: scale(1); /*放大1.1倍*/
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes mechanicsBg {
  0% {
    transform: scale(1.3); /*开始为原始大小*/
  }
  25% {
    transform: scale(1); /*放大1.1倍*/
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}
.bannerItem {
  width: 646px;
  height: 261px;
  background: url("https://file.honglonglong.com.cn/hll_newPc/footerBar/banner1border.png")
    no-repeat;
  background-size: 100%, 100%;
  position: absolute;
  top: 40%;
  left: 32%;
  transform: translate(-50%, -50%);
  z-index: 100;
  -moz-animation: bannerItem 1s 2.25s forwards;
  -webkit-animation: bannerItem 1s 2.25s forwards;
  -ms-animation: bannerItem 1s 2.25s forwards;
  animation: bannerItem 1s 2.25s forwards;
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  opacity: 0;
}
#heightStyleBox {
  -moz-animation: bannerItem 2s 2.25s forwards;
  -webkit-animation: bannerItem 2s 2.25s forwards;
  -ms-animation: bannerItem 2s 2.25s forwards;
  animation: bannerItem 2s 2.25s forwards;
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  opacity: 0;
}
.itemBox {
  text-align: center;
}
.itemTitle {
  font-size: 20px;
  color: #fff;
  font-family: STHeitiSC-Medium, STHeitiSC;
  font-weight: 500;
  margin-top: 33px;
}
.itemName {
  font-size: 50px;
  color: #e4e7ed;
  font-family: SourceHanSansCN-Bold, SourceHanSansCN;
  font-weight: bold;
  margin-top: 19px;
}
.heightStyle {
  width: 200px;
  height: 1px;
  background: #ffffff;
  margin: 41px auto 0 auto;
}
.itmeInfo {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  font-family: STHeitiSC-Medium, STHeitiSC;
  margin-top: 34px;
  span {
    font-size: 20px;
    color: #ff7d59;
  }
}
@-moz-keyframes bannerItem {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-webkit-keyframes bannerItem {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-ms-keyframes bannerItem {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes bannerItem {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}
.navbarBox{
  width: 200px;
  height: 95vh;
  margin-top: 70px;
  background: rgba(0, 0, 0, 0.4);
  position: absolute;
  left: 13%;
  transform: translate(-50%);
  -moz-animation: bannerItem 1s 2.25s forwards;
  -webkit-animation: bannerItem 1s 2.25s forwards;
  -ms-animation: bannerItem 1s 2.25s forwards;
  animation: bannerItem 1s 2.25s forwards;
  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  -ms-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  opacity: 0;
}
@-moz-keyframes navbarBox {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-webkit-keyframes navbarBox {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@-ms-keyframes navbarBox {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes navbarBox {
  0% {
    -moz-transform: translate3d(0, 1em, 0);
    -webkit-transform: translate3d(0, 1em, 0);
    -ms-transform: translate3d(0, 1em, 0);
    transform: translate3d(0, 1em, 0);
    opacity: 0;
  }

  100% {
    -moz-transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}
.navList{
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 14px;
  margin-top: 16px;
  margin-left: 30px;
}
.navItem{
  display: flex;
  align-items: center;
  height: 50px;
  // position: relative;
  cursor: pointer;
}
.navListImg{
  width: 26px;
  height: 15px;
}
.navItemName{
  margin-left: 10px;
  display: flex;
  align-items: center;
  position: relative;
}
.navItemName:hover{
  color: #ff855b;
  font-size: 14px;
}
</style>
